Repository navigation
[W11] 임정현 주간 풀이 - #67
Open
JeonghyeonIm wants to merge 1 commit into
Open
JeonghyeonIm wants to merge 1 commit into
JeonghyeonIm wants to merge 1 commit into
Conversation
Contributor
🤖 PR 자동 분석
변경된 풀이
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 핵심 접근
stage1 (이동): 모든 수하물의 다음 칸을 {무게 내림차순, 번호 오름차순}으로 정렬해 같은 칸 경쟁의 승자를 정하고, 앞 칸이 막힌 수하물은 더 이상 새로 막히는 게 없을 때까지 반복해서 전파한 뒤, 이동 못한 수하물은 bag_not_cnt를 올리고 이동한 수하물은 0으로 리셋합니다.
stage2 (적재, 파손): 9번 칸에 도착한 수하물을 bag_loc에서 제거하며 현재 턴을 기록하고, 연속 3턴 이상 이동하지 못한 수하물은 파손 처리합니다.
stage3 (투입): 투입 시각이 된 수하물을 {투입 턴, 번호} 순으로 정렬해서, 투입 칸이 비어 있고 이번 턴에 먼저 투입된 수하물이 없는 경우에만 bag_loc에 올립니다.
이렇게 stage를 나눠 함수를 구현하였습니다.
🔍 리뷰 요청
stage1부분에서 이동 가능한 후보를 좁히는 다른 과정이 있는지 궁금합니다.